package com.sikaryofficial.information.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sikaryofficial.information.domain.entity.Article;
import com.sikaryofficial.system.api.model.infomation.ArticleDTO;
import com.sikaryofficial.system.api.model.infomation.ArticleListReq;
import com.sikaryofficial.system.api.model.infomation.KolListReq;
import com.sikaryofficial.system.api.model.infomation.StatuteListReq;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 文章Mapper接口
 *
 * @author qinjinyuan
 * @date 2024-03-13
 */
public interface ArticleMapper extends BaseMapper<Article> {
    IPage<ArticleDTO> articleList(Page<ArticleDTO> customerPage, @Param("req") ArticleListReq req, @Param("userId") Long userId);

    IPage<ArticleDTO> statuteListPage(Page<ArticleDTO> customerPage, @Param("req") StatuteListReq req, @Param("userId") Long userId);

    IPage<ArticleDTO> kolListPage(Page<ArticleDTO> customerPage, @Param("req") KolListReq req, @Param("userId") Long userId);

    List<ArticleDTO> ownerLatest(@Param("userId") Long userId,@Param("tenantId")Integer tenantId);
}
